from kafka import KafkaProducer

print("python".encode("utf-8"))

producer = KafkaProducer(bootstrap_servers="node2:9092,node3:9092,node4:9092")

producer.send(topic="python", value="python".encode("utf-8"))
producer.flush()
